As the demand for electronic devices increases, technology has improved to provide designs for electronic devices that operate more quickly and efficiently. In a given electronic device, many interconnected components are designed to operate based on very specific timing relative to each other. As such, typical electronic devices operate using timers configured to signal a time to perform one or more functions. Some electronic devices, such as wireless universal serial bus (WUSB) transceivers, implement a number of different timers operating in different timing protocols to control a variety of functions associated with each of the different timing protocols.
FIG. 1 illustrates an example of a network 10 that implements a variety of different timing functions. The network 10 includes a host device 12 that implements a WUSB communication protocol 14 to act as a wireless host in communicating with a wireless device 16, demonstrated in the example of FIG. 1 as a wireless mouse. The host device 12 can be a computer, or can be any of a variety of other networked devices. As an example, a printer on a wireless network can act as a host for a digital camera via a wireless channel. In the example of FIG. 1, the host device 12 can also implement the WUSB communication protocol 14 to communicate with any of a variety of other wireless devices 16, as well, such as a wireless hard-drive and/or a wireless camera. The host device 12 and the wireless device 16 wirelessly communicate on a wireless channel 18 that includes communication packets configured in the WUSB communication protocol 14.
The WUSB communication protocol 14 includes a transaction timer 20. The transaction timer 20 is a timer that typically increments in a time base of approximately 1 μs, and thus has a frequency of approximately 1 MHz. The transaction timer 20 is configured to control timing associated with the host device 12 to send control packets called micro-scheduled management command (MMC) packets to the wireless device 16 and to transmit and receive data packets and/or other types of packets (e.g., handshaking and/or notification packets) from the wireless device 16. Upon transmitting an MMC packet, the host device 12 resets the transaction timer 20 to zero and sets a scheduled time to perform a function based on an accumulated value of the transaction timer 20. As an example, the scheduled time could be a scheduled time for the computer 12 to transmit a data packet to the wireless device 16, or to activate its receiver to receive a data packet from the wireless device 16. In a similar manner, upon receiving the MMC packet, the wireless device 16 can reset its own transaction timer to zero and can set a scheduled time based on a timestamp that is included in the MMC packet. For example, the scheduled time could be a scheduled time for the wireless device 16 to transmit a data packet, or could be a scheduled time for the wireless device 16 to receive a data packet from another device on the network, such that the scheduled time indicates a time at which the wireless device 16 is to enable its wireless receiver. The time for transmission of an MMC packet from the host device 12 is typically required to be very accurate (e.g., ±40 ns) to compensate for delay times associated with the interactions between a media-access control (MAC) layer on which the transaction timer 20 resides and a physical (PHY) layer from which packets are transmitted on the wireless channel 18.
The WUSB communication protocol 14 also includes a WUSB channel timer 22. Like the transaction timer 20, the WUSB channel timer 22 is a timer that typically increments in a time base of approximately 1 μs, and thus has a frequency of approximately 1 MHz. However, unlike the transaction timer 20, the WUSB channel timer 22 is free-running, such that it does not reset to zero in response to other functions and events. The WUSB channel timer 22 is typically implemented to synchronize the time base of the wireless device 16 with the host device 12. For example, the host device 12 can provide a reference timestamp in the WUSB channel time protocol that is adjusted for MAC-layer and PHY-layer interactions and other delays in an MMC packet that is transmitted to the wireless device 16. Thus, because the reference timestamp is adjusted for time delays, the wireless device 16 can update an internal WUSB channel timer with the timestamp and begin incrementing its internal WUSB channel timer at substantially the same rate as the WUSB channel timer 22, such that each of the host device 12 and the wireless device 16 have substantially synchronized WUSB channel timers. Therefore, the wireless device 16 can implement its internal WUSB channel timer to accurately schedule times for transmission of packets to the host device 12 via the wireless channel 18. Because the WUSB channel timer 22 is typically implemented as a free-running timer, it is typically required to have a very large range. Accordingly, the WUSB channel timer 22 is implemented as a 24-bit timer, with bits 0-7 counting in microseconds (i.e., from 0-124) and bits 8-23 counting in ⅛ milliseconds.
In the example of FIG. 1, the network 10 also includes a set-top box 24 that is coupled to a media device 26, demonstrated in the example of FIG. 1 as a digital television. The set-top box 24 is wirelessly coupled to the host device 12 via the wireless channel 18. However, in the example of FIG. 1, the set-top box 24 communicates with the host device 12 via internet protocol (IP). Thus, in addition to WUSB protocol 14, the host device 12 also includes a WiMedia MAC communication protocol 28 configured to interact with the WUSB communication protocol 14 and one or more other communication protocols to time schedule communications in a time-division multiplexed (TDM) manner over the wireless channel 18. Although the example of FIG. 1 demonstrates that the WUSB communication protocol 14 and the WiMedia MAC communication protocol 28 are separate, the WUSB communication protocol 14 can be considered as operating over the WiMedia MAC communication protocol 28.
The WiMedia MAC communication protocol 28 implements a superframe timer 30 to provide shared communication between the WUSB communication protocol 14 and IP over the wireless channel 18. The superframe timer 30 can be a 16-bit timer that, like the transaction timer 20 and the WUSB channel timer 22, can typically increment in a time base of approximately 1 μs, and thus has a frequency of approximately 1 MHz. Therefore, the superframe timer 30 can define a single superframe of 65,536 microseconds in which the WUSB communication protocol 14 and IP are TDM divided. Upon power-up of the host device 12, the WiMedia MAC communication protocol 28 can begin a superframe based on the last received beacon of the wireless device 16 and the set-top box 24. As such, the WiMedia MAC communication protocol 28 synchronizes superframe timers of the set-top box 24 and the wireless device 16 with the superframe timer 30, such that all of the superframe timers are synchronized with the slowest device beacon. The WiMedia MAC communication protocol 28 can thus schedule packet transmission times on the PHY-layer using the superframe timer 30 on the MAC layer. Accordingly, the WUSB communication protocol 14 and IP can occupy the same wireless channel 18 without interfering with each other.
Because of the very specific functionality of the transaction timer 20, the WUSB channel timer 22, and the superframe timer 30, each of these timers is implemented in a different timing protocol. As a result, the host device 12 and the wireless device 16 may include three separate hardware timing circuits to implement each of the three timers. In addition, each of the three hardware timing circuits are implemented from a clock signal that is specific to the timing operations, such that additional clock hardware for generating the clock signal and for clock edge-synchronization is required. Thus, the hardware that is required to implement the timers occupies additional space, results in added cost, and consumes more power. Furthermore, implementing the three separate timers in three separate timing protocols, such that each requires a dedicated hardware timing circuit, is inflexible in that additional timers and related functions that are subsequently needed would likewise require dedicated timing circuitry at an additional cost.